<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE HTML>
<html>
<head>
<c:set var="path" value="${pageContext.request.contextPath}"
	scope="page" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="renderer" content="webkit">
<link rel="stylesheet" type="text/css" href="${path}/css/ustyle.css">
<link rel="stylesheet" type="text/css" href="${path}/css/zui.min.css">
<script type="text/javascript" src="${path}/js/jquery-1.11.1.min.js"></script>
<script type="text/javascript" src="${path}/js/userpage.js"></script>

<title>User Page</title>
</head>

<body>
	<!--[if lt IE 8]><div class="alert alert-danger">您正在使用 <strong>过时的</strong> 浏览器. 是时候 <a href="http://browsehappy.com/">更换一个更好的浏览器</a> 来提升用户体验.</div><![endif]-->
	<!--[if lt IE 9]><script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script><![endif]-->
	<!--[if lt IE 9]><script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script><![endif]-->

	<!--全屏 -->
	<div id="allscreen"
		style="background:url(${path}/images/userbg.png); display:none;">
		<!--通讯录-->
		<div class="allscreen_centerbox center-block" id="addressbook"
			style="display: none">
			<div class="allscreen_cbox_top">
				<i class="icon-remove f_right" id="close_addbook"></i>通讯录
			</div>
			<div class="allscreen_cbox_bottom">
				<ul class="friends">
					<li>getName</li>
					<li>getName</li>
					<li>getName</li>
					<li>getName</li>
				</ul>
			</div>
		</div>
		<!--个人设置-->
		<!--password box-->
		<div class="allscreen_passwordbox" style="display: none">
			<form id="form_password" name="password">
				<table width="99%" class="table_password">
					<tr>
						<th colspan="2">修改密码</th>
					</tr>
					<tr>
						<td width="40%">输入原密码</td>
						<td><input id="oldpwd" type="password" onfocus="checkpwd0()"
							onblur="checkpwd0()"
							style="height: 20px; width: 140px; border: none;" name="old_pass" /></td>
					</tr>
					<tr>
						<td>输入新密码</td>
						<td><input id="newpwd1" type="password" onfocus="checkpwd()"
							onblur="checkpwd()"
							style="height: 20px; width: 140px; border: none;"
							name="new_pass1" /></td>
					</tr>
					<tr>
						<td>重复新密码</td>
						<td><input id="newpwd2" type="password" onfocus="checkpwd2()"
							onblur="checkpwd2()"
							style="height: 20px; width: 140px; border: none;"
							name="new_pass2" /></td>
					</tr>
					<tr>
						<td colspan="2"><input type="text" name="remind"
							class="remind_pass"
							style="border: none; height: 20px; width: 250px;"
							readonly; onfocus="this.blur()" /></td>
					<tr>
						<td colspan="2"><span class="btn btn-default btn-sm"
							id="pas_cancle">取消</span> <input type="button" value="确认修改密码"
							class="btn btn-default btn-sm disabled" id="pas_submit"
							onClick="pascheck();"></td>
					</tr>
				</table>
			</form>
		</div>
		<!--password box end personal configs-->
		<div class="allscreen_centerbox center-block" id="user_config"
			style="display: none;">
			<div class="allscreen_cbox_top">
				<i id="close_pconfig" class="icon-remove f_right"></i>个人设置
			</div>
			<div class="allscreen_cbox_bottom">
				<form action="${path}/FileUploadServlet" enctype="multipart/form-data" method="post">
					<table width="300px" class="table_config">
						<tr>
							<td width="80px">昵称</td>
							<td width="220px"><input type="text" name="nickname" style="border: none"
								value="${userinfo.nickname}" size="20"></td>
						</tr>
						<tr>
							<td>个人等级</td>
							<td>${userinfo.rate}级<input type="hidden" name="signature" value="${userinfo.signature}"/><input type="hidden" name="username" value="${userinfo.username}"/></td>
						</tr>
						<tr>
							<td width="40%">个人头像</td>
							<td><img class="user_img" src="${userinfo.photo	}"></td>
						</tr>
						<tr>
							<td colspan="2"><input name="photo" type="file"
								size="50" class="f_right"></td>
						</tr>
						<tr>
							<td></td>
							<td><div class="btn btn-sm btn-default" id="change_pass">修改密码</div></td>
						</tr>
						<tr>
							<td colspan="2"><input type="submit" value="提交"
								class="btn btn-primary f_right" id="config_submit"></td>
						</tr>
					</table>
				</form>
			</div>
		</div>
	</div>
	<!--all screen end -->

	<!--Main -->
	<div class="user_head">
		<!--user logout-->
		<div class="user_logout_box">
			<button class="btn btn-primary" id="logout" onclick="logout();">注销</button>
		</div>
		<!--logo-->
		<div class="user_logo_box">
			<img src="${path}/images/logob.png" />
		</div>
		<!--user img-->
		<div class="user_img_box">
			<img class="user_index_img" src="${userinfo.photo}">
		</div>
		<!--user info-->
		<div class="user_info_box">
			<table width="100%" class="table_user_info">
				<tr>
					<td><b>${userinfo.nickname}</b></td>
				</tr>
				<tr>
					<td>${userinfo.rate}级<i class="icon-sun"></i></td>
				</tr>
			</table>
		</div>
		<!--user sign-->
		<!--user sign-->
		<div class="user_sign_box">
			<form name="user_sign">
				<div class="user_sign_top">
					<input type="text" value="${userinfo.signature}" id="get_sign"
						style="border: none; color: #FFF; background: none; width: 300px"
						readonly="readonly" />
				</div>
				<div class="user_sign_bottom">
					<input type="text" id="post_sign" name="post_sign"
						placeholder="写下你的个性签名..." style="width: 400px; border: none" />
				</div>
			</form>
		</div>
		<!--head end blow-->
	</div>
	<!--BODY -->
	<div class="user_body">
		<div class="center-block" style="width: 800px; margin-top: 15px;">

			<a href="${path}/ShowBriefNoteController">
				<div class="user_circle c_note">
					求知笔记 <img class="img_note c_show" src="${path}/images/circle1w.png">
				</div>
			</a> <a href="${path}/ShowBrief4BlogQuesController">
				<div class="user_circle c_plaza">
					求知广场 <img class="img_plaza c_show"
						src="${path}/images/circle2w.png">
				</div>
			</a> <a href="${path}/ShowJobControllerByUser">
				<div class="user_circle c_hire">
					招聘信息 <img class="img_hire c_show" src="/qiuzhi/images/circle3w.png">
				</div>
			</a> <a href="${path}/ShowNewsControllerByUser">
				<div class="user_circle c_news">
					行业新闻 <img class="img_news c_show" src="/qiuzhi/images/circle4w.png">
				</div>
			</a>

			<div class="user_circle c_addbook" id="circle_adbook">
				通讯录 <img class="img_addbook c_show"
					src="/qiuzhi/images/circle5w.png">
			</div>

			<div class="user_circle c_config" id="circle_config">
				个人设置 <img class="img_config c_show"
					src="${path}/images/circle6w.png">
			</div>

		</div>
	</div>

	<!-- FOOT -->
	<div class="user_foot">Copyrights(C)1997-2014 求知无限有限公司 Thirsty
		for Knowledge Co.Ltd 版权所有 不得转载</div>
	<script type="text/javascript">
		function logout() {
			$.post("/qiuzhi/LogoutController", function(data) {
				if (data == "1") {
					alert("注销成功");
					window.location.href = "/qiuzhi/index.html";
				}
			});
		}
	</script>
</body>

</html>
